A little bit of threejs prototyping

This commit is contained in:
Stefan Zermatten
2023-09-05 23:31:40 +02:00
parent 1847525e62
commit 64e4d80b5b
5 changed files with 101 additions and 13 deletions

View File

@@ -0,0 +1,43 @@
import SimpleSchema from 'simpl-schema';
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
let TabletopObjects = new Mongo.Collection('tabletopObjects');
let TabletopObjectSchema = new SimpleSchema({
name: {
type: String,
optional: true,
},
texture: {
type: String,
regEx: SimpleSchema.RegEx.Id,
},
position: {
type: Object,
optional: true,
},
'position.x': {
type: Number,
},
'position.y': {
type: Number,
},
width: {
type: Number,
},
height: {
type: Number,
},
rotation: {
type: Number,
max: 360,
min: 0,
},
});
const schema = new SimpleSchema({});
schema.extend(ChildSchema);
schema.extend(TabletopObjectSchema);
TabletopObjects.attachSchema(schema);
export default TabletopObjects;