mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
0.1.3
This commit is contained in:
parent
ca3c622fad
commit
d9265d03f3
59190
build/trois.js
59190
build/trois.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/trois.min.js
vendored
2
build/trois.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -930,7 +930,13 @@ var TubeGeometry = {
|
||||
};
|
||||
|
||||
var Light = {
|
||||
inject: ['scene'],
|
||||
inject: {
|
||||
scene: 'scene',
|
||||
parent: {
|
||||
from: 'group',
|
||||
default: function () { return inject('scene'); },
|
||||
},
|
||||
},
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
@ -949,9 +955,6 @@ var Light = {
|
||||
},
|
||||
// can't use setup because it will not be used in sub components
|
||||
// setup() {},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
},
|
||||
mounted: function mounted() {
|
||||
var this$1 = this;
|
||||
|
||||
@ -1456,7 +1459,15 @@ var CubeTexture = {
|
||||
};
|
||||
|
||||
var Mesh = {
|
||||
inject: ['three', 'scene', 'rendererComponent'],
|
||||
inject: {
|
||||
three: 'three',
|
||||
scene: 'scene',
|
||||
rendererComponent: 'rendererComponent',
|
||||
parent: {
|
||||
from: 'group',
|
||||
default: function () { return inject('scene'); },
|
||||
},
|
||||
},
|
||||
emits: ['ready'],
|
||||
props: {
|
||||
materialId: String,
|
||||
@ -1470,9 +1481,6 @@ var Mesh = {
|
||||
},
|
||||
// can't use setup because it will not be used in sub components
|
||||
// setup() {},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
},
|
||||
provide: function provide() {
|
||||
return {
|
||||
mesh: this,
|
||||
@ -2206,8 +2214,9 @@ var InstancedMesh = {
|
||||
castShadow: Boolean,
|
||||
receiveShadow: Boolean,
|
||||
},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
setup: function setup() {
|
||||
var parent = inject('group', inject('scene'));
|
||||
return { parent: parent };
|
||||
},
|
||||
provide: function provide() {
|
||||
return {
|
||||
@ -2346,8 +2355,9 @@ var Sprite = {
|
||||
position: Object,
|
||||
scale: Object,
|
||||
},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
setup: function setup() {
|
||||
var parent = inject('group', inject('scene'));
|
||||
return { parent: parent };
|
||||
},
|
||||
mounted: function mounted() {
|
||||
this.texture = new TextureLoader().load(this.src, this.onLoaded);
|
||||
|
File diff suppressed because one or more lines are too long
2
build/trois.module.cdn.min.js
vendored
2
build/trois.module.cdn.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -929,7 +929,13 @@ var TubeGeometry = {
|
||||
};
|
||||
|
||||
var Light = {
|
||||
inject: ['scene'],
|
||||
inject: {
|
||||
scene: 'scene',
|
||||
parent: {
|
||||
from: 'group',
|
||||
default: function () { return inject('scene'); },
|
||||
},
|
||||
},
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
@ -948,9 +954,6 @@ var Light = {
|
||||
},
|
||||
// can't use setup because it will not be used in sub components
|
||||
// setup() {},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
},
|
||||
mounted: function mounted() {
|
||||
var this$1 = this;
|
||||
|
||||
@ -1455,7 +1458,15 @@ var CubeTexture = {
|
||||
};
|
||||
|
||||
var Mesh = {
|
||||
inject: ['three', 'scene', 'rendererComponent'],
|
||||
inject: {
|
||||
three: 'three',
|
||||
scene: 'scene',
|
||||
rendererComponent: 'rendererComponent',
|
||||
parent: {
|
||||
from: 'group',
|
||||
default: function () { return inject('scene'); },
|
||||
},
|
||||
},
|
||||
emits: ['ready'],
|
||||
props: {
|
||||
materialId: String,
|
||||
@ -1469,9 +1480,6 @@ var Mesh = {
|
||||
},
|
||||
// can't use setup because it will not be used in sub components
|
||||
// setup() {},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
},
|
||||
provide: function provide() {
|
||||
return {
|
||||
mesh: this,
|
||||
@ -2205,8 +2213,9 @@ var InstancedMesh = {
|
||||
castShadow: Boolean,
|
||||
receiveShadow: Boolean,
|
||||
},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
setup: function setup() {
|
||||
var parent = inject('group', inject('scene'));
|
||||
return { parent: parent };
|
||||
},
|
||||
provide: function provide() {
|
||||
return {
|
||||
@ -2345,8 +2354,9 @@ var Sprite = {
|
||||
position: Object,
|
||||
scale: Object,
|
||||
},
|
||||
created: function created() {
|
||||
this.parent = inject('group', this.scene);
|
||||
setup: function setup() {
|
||||
var parent = inject('group', inject('scene'));
|
||||
return { parent: parent };
|
||||
},
|
||||
mounted: function mounted() {
|
||||
this.texture = new TextureLoader().load(this.src, this.onLoaded);
|
||||
|
File diff suppressed because one or more lines are too long
2
build/trois.module.min.js
vendored
2
build/trois.module.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "troisjs",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
@ -126,41 +126,41 @@ export default [
|
||||
terser(),
|
||||
],
|
||||
},
|
||||
{
|
||||
input,
|
||||
external: [
|
||||
'gsap',
|
||||
'vue',
|
||||
],
|
||||
output: {
|
||||
format: 'cjs',
|
||||
file: 'build/trois.js',
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
...plugins,
|
||||
resolve({
|
||||
moduleDirectories: ['node_modules'],
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
input,
|
||||
external: [
|
||||
'gsap',
|
||||
'vue',
|
||||
],
|
||||
output: {
|
||||
format: 'cjs',
|
||||
file: 'build/trois.min.js',
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
...plugins,
|
||||
resolve({
|
||||
moduleDirectories: ['node_modules'],
|
||||
}),
|
||||
terser(),
|
||||
],
|
||||
},
|
||||
// {
|
||||
// input,
|
||||
// external: [
|
||||
// 'gsap',
|
||||
// 'vue',
|
||||
// ],
|
||||
// output: {
|
||||
// format: 'cjs',
|
||||
// file: 'build/trois.js',
|
||||
// sourcemap: true,
|
||||
// },
|
||||
// plugins: [
|
||||
// ...plugins,
|
||||
// resolve({
|
||||
// moduleDirectories: ['node_modules'],
|
||||
// }),
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// input,
|
||||
// external: [
|
||||
// 'gsap',
|
||||
// 'vue',
|
||||
// ],
|
||||
// output: {
|
||||
// format: 'cjs',
|
||||
// file: 'build/trois.min.js',
|
||||
// sourcemap: true,
|
||||
// },
|
||||
// plugins: [
|
||||
// ...plugins,
|
||||
// resolve({
|
||||
// moduleDirectories: ['node_modules'],
|
||||
// }),
|
||||
// terser(),
|
||||
// ],
|
||||
// },
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user