lottery
🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀
Paint in VR in your browser. Read more!
git clone git@github.com:aframevr/a-painter && cd a-painter npm install npm start
Then, load http://localhost:8080 in your browser.
To create a new brush, implement the following interface:
BrushInterface.prototype = {
init: function () {},
addPoint: function (position, orientation, pointerPosition, pressure, timestamp) {},
tick: function (timeOffset, delta) {}
};
init (): Use this for initializing variables, materials, etc. for your brush.
addPoint (Mandatory): It will be called every time the brush should add a new point to the stroke. You should return true if you've added something to the scene and false otherwise. To add some mesh to the scene, every brush has an injected object3D attribute that can be used to add children to the scene.
tick (Optional): Is called on every frame.
Development Tip: set your brush as the default brush at the top of
src/components/brush.js (brush: {default: 'yourbrush'}) while developing so
you don't have to re-select it every time you reload.
Every brush will have some common data injected with the following default values:
this.data = {
points: [],
size: brushSize,
prevPosition: null,
prevPointerPosition: null,
numPoints: 0,
maxPoints: 1000,
color: color.clone()
};
addPoint.)addPoint call).addPoint call).points array.To register a new brush we should call AFRAME.registerBrush:
AFRAME.registerBrush(brushName, brushDefinition, options);
Register brush needs three parameters:
brushDefinition.addPoint.addPoint won't be called after reaching that number of points.A-Painter uses the following custom binary file format to store the drawings and its strokes.
string magic ('apainter')
uint16 version (currently 1)
uint8 num_brushes_used
[num_brushed_used] x {
string brush_name
}
uint32 num_strokes
[num_strokes] x {
uint8 brush_index (Based on the previous definition order)
float32x3 color (rgb)
float32 size
uint32 num_points
[num_points] x {
float32x3 position (vector3)
float32x4 orientation (quaternion)
float32 intensity
uint32 timestamp
}
}
string = uint8 (size) + size * uint8
more like this
🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀
🎥🤟 8 minimalistic templates for tfjs mediapipe handpose and facemesh
A repository about starting from scratch for monorepo, fastify, Phaser, colyseus, and threejs.
search projects, people, and tags