kopia lustrzana https://github.com/Tldraw/Tldraw
pull/3307/head
rodzic
d9e3486724
commit
8f3fedf297
|
@ -3214,9 +3214,9 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|||
* @public
|
||||
*/
|
||||
@computed getRenderingShapes() {
|
||||
const now = Date.now()
|
||||
// const now = Date.now()
|
||||
const renderingShapes = this.getUnorderedRenderingShapes(true)
|
||||
console.log('getUnorderedRenderingShapes', Date.now() - now)
|
||||
// console.log('getUnorderedRenderingShapes', Date.now() - now)
|
||||
|
||||
// Its IMPORTANT that the result be sorted by id AND include the index
|
||||
// that the shape should be displayed at. Steve, this is the past you
|
||||
|
|
|
@ -44,11 +44,11 @@ export class SpatialIndex {
|
|||
|
||||
getShapesInsideBounds(bounds: Box): TLShapeId[] {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const now = Date.now()
|
||||
// const now = Date.now()
|
||||
const result = this.rBushIncremental().get()
|
||||
const rbush = new TldrawRBush().fromJSON(result)
|
||||
const r = rbush.search(bounds).map((b) => b.id)
|
||||
console.log('shapes inside bounds', Date.now() - now, 'ms')
|
||||
// console.log('shapes inside bounds', Date.now() - now, 'ms')
|
||||
return r
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue