@antv/g-plugin-3d
Advanced tools
Comparing version 1.0.0-alpha.10 to 1.0.0-alpha.11
@@ -1,6 +0,10 @@ | ||
import { GeometryAABBUpdater, AABB } from '@antv/g'; | ||
import { GeometryAABBUpdater } from '@antv/g'; | ||
import { CubeStyleProps } from '../Cube'; | ||
export declare class CubeUpdater implements GeometryAABBUpdater<CubeStyleProps> { | ||
dependencies: string[]; | ||
update(attributes: CubeStyleProps, aabb: AABB): void; | ||
update(attributes: CubeStyleProps): { | ||
width: number; | ||
height: number; | ||
depth: number; | ||
}; | ||
} |
@@ -5,3 +5,6 @@ import { GeometryAABBUpdater, AABB } from '@antv/g'; | ||
dependencies: string[]; | ||
update(attributes: GridStyleProps, aabb: AABB): void; | ||
update(attributes: GridStyleProps, aabb: AABB): { | ||
width: number; | ||
height: number; | ||
}; | ||
} |
@@ -5,3 +5,7 @@ import { GeometryAABBUpdater, AABB } from '@antv/g'; | ||
dependencies: string[]; | ||
update(attributes: SphereStyleProps, aabb: AABB): void; | ||
update(attributes: SphereStyleProps, aabb: AABB): { | ||
width: number; | ||
height: number; | ||
depth: number; | ||
}; | ||
} |
@@ -419,2 +419,86 @@ import { RenderingService, Renderable, DisplayObject, container, GeometryAABBUpdater } from '@antv/g'; | ||
var CubeUpdater = /*#__PURE__*/function () { | ||
function CubeUpdater() { | ||
_classCallCheck(this, CubeUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(CubeUpdater, [{ | ||
key: "update", | ||
value: function update(attributes) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth; | ||
return { | ||
width: width, | ||
height: height, | ||
depth: depth | ||
}; | ||
} | ||
}]); | ||
return CubeUpdater; | ||
}(); | ||
CubeUpdater = __decorate([injectable()], CubeUpdater); | ||
var SphereUpdater = /*#__PURE__*/function () { | ||
function SphereUpdater() { | ||
_classCallCheck(this, SphereUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(SphereUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth; | ||
return { | ||
width: width, | ||
height: height, | ||
depth: depth | ||
}; | ||
} | ||
}]); | ||
return SphereUpdater; | ||
}(); | ||
SphereUpdater = __decorate([injectable()], SphereUpdater); | ||
var GridUpdater = /*#__PURE__*/function () { | ||
function GridUpdater() { | ||
_classCallCheck(this, GridUpdater); | ||
this.dependencies = ['width', 'height', 'anchor']; | ||
} | ||
_createClass(GridUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height; | ||
return { | ||
width: width, | ||
height: height | ||
}; | ||
} | ||
}]); | ||
return GridUpdater; | ||
}(); | ||
GridUpdater = __decorate([injectable()], GridUpdater); | ||
/** | ||
@@ -604,93 +688,2 @@ * Common utilities | ||
var CubeUpdater = /*#__PURE__*/function () { | ||
function CubeUpdater() { | ||
_classCallCheck(this, CubeUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(CubeUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; // anchor is left-top by default | ||
// attributes.x = minX + anchor[0] * width; | ||
// attributes.y = minY + anchor[1] * height; | ||
var halfExtents = fromValues(width / 2, height / 2, depth / 2); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return CubeUpdater; | ||
}(); | ||
CubeUpdater = __decorate([injectable()], CubeUpdater); | ||
var SphereUpdater = /*#__PURE__*/function () { | ||
function SphereUpdater() { | ||
_classCallCheck(this, SphereUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(SphereUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; // anchor is left-top by default | ||
// attributes.x = minX + anchor[0] * width; | ||
// attributes.y = minY + anchor[1] * height; | ||
var halfExtents = fromValues(width / 2, height / 2, depth / 2); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return SphereUpdater; | ||
}(); | ||
SphereUpdater = __decorate([injectable()], SphereUpdater); | ||
var GridUpdater = /*#__PURE__*/function () { | ||
function GridUpdater() { | ||
_classCallCheck(this, GridUpdater); | ||
this.dependencies = ['width', 'height', 'anchor']; | ||
} | ||
_createClass(GridUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; | ||
var halfExtents = fromValues(width / 2, height / 2, 1); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return GridUpdater; | ||
}(); | ||
GridUpdater = __decorate([injectable()], GridUpdater); | ||
var imageVertex = "attribute vec3 a_Position;\nattribute vec3 a_Normal;\n\nuniform mat4 u_ProjectionMatrix;\nuniform mat4 u_ViewMatrix;\nuniform vec4 u_Color;\n\nvarying vec4 v_Color;\n\n#pragma include \"uv.declaration\"\n\n#pragma include \"instancing.declaration\"\n#pragma include \"picking\"\n\nvoid main() {\n v_Color = u_Color;\n\n #pragma include \"instancing\"\n\n gl_Position = u_ProjectionMatrix * u_ViewMatrix * modelMatrix * vec4(a_Position, 1.0);\n\n #pragma include \"uv\"\n\n setPickingColor(a_PickingColor);\n}"; | ||
@@ -697,0 +690,0 @@ |
@@ -423,2 +423,86 @@ 'use strict'; | ||
var CubeUpdater = /*#__PURE__*/function () { | ||
function CubeUpdater() { | ||
_classCallCheck(this, CubeUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(CubeUpdater, [{ | ||
key: "update", | ||
value: function update(attributes) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth; | ||
return { | ||
width: width, | ||
height: height, | ||
depth: depth | ||
}; | ||
} | ||
}]); | ||
return CubeUpdater; | ||
}(); | ||
CubeUpdater = __decorate([injectable()], CubeUpdater); | ||
var SphereUpdater = /*#__PURE__*/function () { | ||
function SphereUpdater() { | ||
_classCallCheck(this, SphereUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(SphereUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth; | ||
return { | ||
width: width, | ||
height: height, | ||
depth: depth | ||
}; | ||
} | ||
}]); | ||
return SphereUpdater; | ||
}(); | ||
SphereUpdater = __decorate([injectable()], SphereUpdater); | ||
var GridUpdater = /*#__PURE__*/function () { | ||
function GridUpdater() { | ||
_classCallCheck(this, GridUpdater); | ||
this.dependencies = ['width', 'height', 'anchor']; | ||
} | ||
_createClass(GridUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height; | ||
return { | ||
width: width, | ||
height: height | ||
}; | ||
} | ||
}]); | ||
return GridUpdater; | ||
}(); | ||
GridUpdater = __decorate([injectable()], GridUpdater); | ||
/** | ||
@@ -608,93 +692,2 @@ * Common utilities | ||
var CubeUpdater = /*#__PURE__*/function () { | ||
function CubeUpdater() { | ||
_classCallCheck(this, CubeUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(CubeUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; // anchor is left-top by default | ||
// attributes.x = minX + anchor[0] * width; | ||
// attributes.y = minY + anchor[1] * height; | ||
var halfExtents = fromValues(width / 2, height / 2, depth / 2); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return CubeUpdater; | ||
}(); | ||
CubeUpdater = __decorate([injectable()], CubeUpdater); | ||
var SphereUpdater = /*#__PURE__*/function () { | ||
function SphereUpdater() { | ||
_classCallCheck(this, SphereUpdater); | ||
this.dependencies = ['height', 'width', 'depth', 'anchor']; | ||
} | ||
_createClass(SphereUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$depth = attributes.depth, | ||
depth = _attributes$depth === void 0 ? 0 : _attributes$depth, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; // anchor is left-top by default | ||
// attributes.x = minX + anchor[0] * width; | ||
// attributes.y = minY + anchor[1] * height; | ||
var halfExtents = fromValues(width / 2, height / 2, depth / 2); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return SphereUpdater; | ||
}(); | ||
SphereUpdater = __decorate([injectable()], SphereUpdater); | ||
var GridUpdater = /*#__PURE__*/function () { | ||
function GridUpdater() { | ||
_classCallCheck(this, GridUpdater); | ||
this.dependencies = ['width', 'height', 'anchor']; | ||
} | ||
_createClass(GridUpdater, [{ | ||
key: "update", | ||
value: function update(attributes, aabb) { | ||
var _attributes$width = attributes.width, | ||
width = _attributes$width === void 0 ? 0 : _attributes$width, | ||
_attributes$height = attributes.height, | ||
height = _attributes$height === void 0 ? 0 : _attributes$height, | ||
_attributes$anchor = attributes.anchor, | ||
anchor = _attributes$anchor === void 0 ? [0, 0] : _attributes$anchor; | ||
var halfExtents = fromValues(width / 2, height / 2, 1); | ||
var center = fromValues((1 - anchor[0] * 2) * halfExtents[0], (1 - anchor[1] * 2) * halfExtents[1], (1 - anchor[1] * 2) * halfExtents[2]); | ||
aabb.update(center, halfExtents); | ||
} | ||
}]); | ||
return GridUpdater; | ||
}(); | ||
GridUpdater = __decorate([injectable()], GridUpdater); | ||
var imageVertex = "attribute vec3 a_Position;\nattribute vec3 a_Normal;\n\nuniform mat4 u_ProjectionMatrix;\nuniform mat4 u_ViewMatrix;\nuniform vec4 u_Color;\n\nvarying vec4 v_Color;\n\n#pragma include \"uv.declaration\"\n\n#pragma include \"instancing.declaration\"\n#pragma include \"picking\"\n\nvoid main() {\n v_Color = u_Color;\n\n #pragma include \"instancing\"\n\n gl_Position = u_ProjectionMatrix * u_ViewMatrix * modelMatrix * vec4(a_Position, 1.0);\n\n #pragma include \"uv\"\n\n setPickingColor(a_PickingColor);\n}"; | ||
@@ -701,0 +694,0 @@ |
{ | ||
"name": "@antv/g-plugin-3d", | ||
"version": "1.0.0-alpha.10", | ||
"version": "1.0.0-alpha.11", | ||
"description": "Provide 3D extension for G", | ||
@@ -43,7 +43,8 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@antv/g": "^1.0.0-alpha.9", | ||
"@antv/g-plugin-dom-interaction": "^1.0.0-alpha.10", | ||
"@antv/g-plugin-webgl-renderer": "^1.0.0-alpha.10", | ||
"@antv/g": "^1.0.0-alpha.10", | ||
"@antv/g-plugin-dom-interaction": "^1.0.0-alpha.11", | ||
"@antv/g-plugin-webgl-renderer": "^1.0.0-alpha.11", | ||
"@antv/util": "^2.0.13" | ||
} | ||
}, | ||
"gitHead": "6ea64d4add97bc8c008d804cb79bc93b1f80b5a2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2735
112846